<template>
  <div class="container mx-auto px-4">
    <div class="flex flex-col min-h-screen">
      <header class="py-4 border-b-4">
        <nav class="flex flex-wrap justify-between items-center">
          <div class="flex items-center">
            <h1 class="text-3xl font-bold">
              实训报告管理系统
              <small class="font-mono font-light text-sm text-accent">
                {{ version }}
              </small>
            </h1>
          </div>
          <div class="flex items-center gap-4">
            <RouterLink
              class="link link-primary no-underline"
              v-for="l of links"
              :to="l.to"
            >
              {{ l.label }}
            </RouterLink>
          </div>
          <UserAvatar />
        </nav>
      </header>
      <main class="flex-grow">
        <RouterView />
      </main>
      <footer class="py-4 text-center">
        <p>© 2025 TrainingReport.xyz. 版权所有。</p>
      </footer>
    </div>
  </div>
</template>
<script setup lang="ts">
import UserAvatar from "../components/UserAvatar.vue";
const version = import.meta.env.VITE_VERSION;
const links = [
  {
    label: "课程管理",
    to: "/",
  },
  {
    label: "个人信息管理",
    to: "/profile",
  },
];
</script>
